﻿using Xejen.Ipc.Framework;
using Xejen.Ipc.Framework.Flows;
using Xejen.Ipc.Framework.Steps;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xejen.Ipc.Test.Steps
{
    /// <summary>
    /// 表示单元5这个步骤
    /// </summary>
    public class Unit5 : IStepBody<Data>
    {
        /// <inheritdoc/>
        public async Task ExecuteAsync(IFlowExecutionContext<Data> context)
        {
            //Debug.WriteLine("执行了单元5的逻辑，要停留2秒");

            //await Task.Delay(2000);

            //Debug.WriteLine("单元5终止执行完成了，啊，好累呀，啦啦啦啦啦啦啦啦啦啦啦啦");

            //context.Flow.Controllers.ForEach((controller) =>
            //{
            //    Debug.WriteLine(controller.Name);

            //    controller.Steps.ForEach((step) =>
            //    {
            //        Debug.WriteLine("步骤：" + step.Id + ":" + step.Name);
            //    });
            //});

            await Task.CompletedTask;
        }
    }
}
